package com.auto.survey.activity.monitoring.entity.relations

import androidx.room.Embedded
import androidx.room.Relation
import com.auto.survey.activity.monitoring.entity.MonitoringObservation
import com.auto.survey.activity.monitoring.entity.MonitoringPoint

/**
 * 测点与观测数据关联类
 * 用于获取测点及其关联的所有观测数据
 */
data class MonitoringPointWithObservations(
    /**
     * 测点信息
     */
    @Embedded val point: MonitoringPoint,
    /**
     * 测点关联的观测数据列表，按观测时间降序排列
     */
    @Relation(
        parentColumn = "id",
        entityColumn = "pointId"
    )
    val observations: List<MonitoringObservation>
)